<include file="../header" />
<div class="wrapper">
    <div class="header text-center font-16">
        智能报修
        <div class="iconfont icon-zuo go_back"></div>
    </div>
    <div class="tab flex-between ">
        <if condition="$patrolRepair eq 0">
            <div class="tab-list text-center" id="repair"><span class="actived">报修</span></div>
            <div class="tab-list text-center" id="patrol"><span>巡查</span></div>
        </if>
    </div>
    <div>
        <div class="history-list" id="repair_list">
            <volist name="repair" id="vo">
                <div class="list repair_list" data-id="{BEESCRM:$vo.order_id}">
                    <div>
                        <if condition="$vo['type'] eq 3">
                            <span class="everyday green-bg">快捷</span>
                            <elseif condition="$vo['type'] eq 2"/>
                            <span class="everyday red-bg">公共</span>
                            <else/>
                            <span class="everyday">日常</span>
                        </if>
                        <span class="font-16">{BEESCRM:$vo.content}</span>
                    </div>
                    <div>
                        <span class="gray ">
                            {BEESCRM:$vo.create_time|date="Y-m-d",###}
                        </span>
                        <span class="pull-right orange">
                            <if condition="$vo['status'] eq 0">
                                已取消
                            <elseif condition="$vo['status'] eq 3"/>
                                已接单
                            <elseif condition="$vo['status'] eq 5"/>
                                已维修
                            <elseif condition="$vo['status'] eq 6"/>
                                已评价
                            </if>
                        </span>
                    </div>
                </div>
            </volist>
        </div>
        <div class="history-list hide" id="patrol_list">
            <volist name="patrol" id="vo">
                <div class="list padding-12-0 patrol_list" data-id="{BEESCRM:$vo.log_id}">
                    <span>{BEESCRM:$vo.create_time|date="Y-m-d",###}</span>
                    <span>{BEESCRM:$vo.patrol_object}</span>
                    <!--<span class="pull-right font-16">{BEESCRM:$vo.content}</span>-->
                </div>
            </volist>
        </div>
    </div>
</div>
<script>
    $(function () {
        $('#repair').click(function(){
            $('#patrol span').removeClass('actived');
            $('#repair span').addClass('actived');
            $('#repair_list').removeClass('hide');
            $('#patrol_list').addClass('hide');
        });
        $('#patrol').click(function(){
            $('#repair span').removeClass('actived');
            $('#patrol span').addClass('actived');
            $('#patrol_list').removeClass('hide');
            $('#repair_list').addClass('hide');
        });

        $('.repair_list').click(function(){
            var id = $(this).data('id');
            var url = '/Repaireast/RepaireastWorker/orderDetail/order_id/'+id+'/type/1';
            window.location.href = url;
        });

        $('.patrol_list').click(function(){
            var id = $(this).data('id');
            var url = '/Repaireast/RepaireastWorker/patrolInfo/log_id/'+id;
            window.location.href = url;
        });
    })
</script>
<include file="../footer" />